<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.util.*"%>
<%@ page import="java.sql.*"%>
<%@ page import="com.cqggrw.util.*"%>
<%@ page import="com.cqggrw.domain.*"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	String id = request.getParameter("id");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>公共人物网后台管理</title>
<link type="text/css" rel="Stylesheet" href="<%=basePath%>Admin/Content/tabbed_pages.css" />
<link type="text/css" rel="Stylesheet" href="<%=basePath%>Admin/Content/Index.css" />
<script type="text/javascript" src="<%=basePath%>jslib/calendar.js"></script>
<script type="text/javascript" src="<%=basePath%>jslib/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=basePath%>jslib/utils.js"></script>
<script type="text/javascript" src="<%=basePath%>jslib/ueditor/editor_config.js"></script>
<script type="text/javascript" src="<%=basePath%>jslib/ueditor/editor_all_min.js"></script>
<script type="text/javascript">
	var editor = undefined;
	var idStr = <%=id%>
	;
	var imgFalg = undefined;
	$(function() {
		editor = new UE.ui.Editor();
		editor.render("myEditor");

		editor.ready(function() {
			editor.setContent('');
			editor.setHeight(250);

			$.ajax({
				url : '${pageContext.request.contextPath}/aboutAction!getById.action?id=' + idStr,
				type : 'POST',
				dataType : 'json',
				success : function(news) {
					if (news) {
						$("#name").val(news.name);
						$("#id").val(news.id);
						editor.setContent(news.content);
						$("#txtcontent").val(news.txtContent);
					}
				}
			});
		});
	});
	function WebForm_OnSubmit() {
		if (editor.getContent() == '') {
			alert('请填写-栏目内容：');
			return false;
		}
		return true;
	}

</script>
<style type="text/css">
.productImage {
	float: left;
	width: 200px;
	margin-left: 20px;
}

.productImage img {
	width: 200px;
	height: 150px;
}
</style>
</head>
<body>
	<form name="form1" method="post" action="aboutAction!modify.action" onsubmit="javascript:return WebForm_OnSubmit();" id="form1" enctype="multipart/form-data">
		<input type="hidden" name="id" id="id" />
		<div class="form-div textLeft">
			<h1>
				<span class="action-span"><a href="aboutList.jsp">栏目列表</a> </span> <span class="action-span1 fs20">公共人物网 管理中心 </span><span class="action-span1 paddingTop5"> - 新闻编辑 </span>
			</h1>
			<div style="clear:both"></div>
		</div>
		<div id="gallery">
			<div class="on" title="CommonInfo">
				<span>栏目信息</span>
			</div>
		</div>
		<div id="CommonInfo" class="show">
			<table width="90%" id="general-table" align="center">
				<tr>
					<td>栏目名称： <input name="name" readonly="readonly" type="text" maxlength="60" id="name" style="width:318px;" /> <span id="RequiredFieldValidator1" style="color:Red;visibility:hidden;">*</span></td>
				</tr>
				<tr>
					<td>
						<table>
							<tr>
								<td>栏目内容：</td>
								<td>
									<div>
										<textarea name="content" id="myEditor"></textarea>
									</div>
								</td>
							</tr>
						</table></td>
				</tr>
			</table>
		</div>
		<div class="form-div textLeft" style="text-align:center;margin-top:5px;">
			<input type="submit" name="btnSave" value="保存" id="btnSave" class="button" />
		</div>
	</form>
</body>
</html>